package com.joe.learn.utils;

import java.util.concurrent.ThreadFactory;

public class BaseThreadFactory implements ThreadFactory {
    private String name;
    private int thread_no;

    public BaseThreadFactory(String name) {
        this.name = name;
    }

    public Thread newThread(Runnable runnable) {
        return new Thread(runnable, this.name + "-" + this.thread_no++);
    }
}